package guoanmaker.operator.business.repository;

import guoanmaker.operator.business.model.OperatorSpaceAppointment;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.ArrayList;

/**
 *  
 *
 * @author huZhaoyu 
 * @ClassName: OperatorSpaceAppointmentRepository
 * @Description: 空间预约Repository
 * @date 2017/6/28
 */
public interface OperatorSpaceAppointmentRepository extends JpaRepository<OperatorSpaceAppointment, String>, JpaSpecificationExecutor<OperatorSpaceAppointment> {
//	@Query("select u from OperatorUser u left join fetch u.roles r where u.username=:username")
//    public Optional<OperatorUser> findByUsername(@Param("username") String username);

    ArrayList<OperatorSpaceAppointment> findByAppointmentNameContainingAndAppointmentPhoneContainingOrderByCreateDateDesc(String appointmentName, String appointmentPhone, Pageable pageable);

}